fix(actions): recover agent text from execution file (closes #177)#178
Conversation
… its path claude-code-action@v1.x exposes only execution_file (a path to a JSONL transcript); claude-harness re-exports it as the deprecated `result` alias. Five pre-v1 callers (flag-audit, agent-test, agent-test-gen, create-release, eval-smoke) consumed `result` as if it were Claude's text output, so they emitted the raw path. The visible symptom was flag-audit filing issues whose body was literally "/home/runner/_work/_temp/claude-execution-output.json" (#177). Add a shared _common/extract-text action that reads the execution file and recovers the agent's final text (result record -> last assistant text blocks -> single-object .result -> plain-text passthrough), and wire it into all five callers. Keep the `result` alias for any unmigrated consumers. Closes #177
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis PR introduces a new ChangesExtract-text capability and migration
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
代码审查变更意图:Bug 修复 意图说明:修复 风险等级: 低 | 审查置信度: 高 | 结论: ✅ 可直接合入 1. 无影响变更
2. 建议关注(非阻塞)
3. 需要修复的问题无。 设计亮点
完成度分析
影响分析 + 建议验证 + 最终结论
|
代码审查报告风险等级: 中 | 审查置信度: 高 | 结论: 修复后合入 摘要: PR #178 修复了 claude-code-action@v1.x 升级后 变更意图
1. 无影响变更
2. 建议关注(非阻塞)
3. 需要修复的问题
完成度分析
影响分析正面影响:
潜在影响:
建议验证
最终结论修复后合入 — 核心逻辑正确,测试覆盖充分,但建议增加空文件和大文件的边界检查。 Code Review 修复任务审查结论: 修复后合入 需要修复的问题
修复要求
|
代码审查报告风险等级: 低风险 | 审查置信度: 高 | 结论: 建议进一步验证(Lint 和 Coverage 检查失败需确认) 摘要: PR 修复了 Issue #177 报告的问题:claude-code-action@v1.x 返回的是执行文件路径而非文本内容,导致 5 个调用方误将路径当作文本输出。新增 变更意图
1. 无影响变更
2. 建议关注(非阻塞)
3. 需要修复的问题
影响链分析(针对 CI 失败)Lint 失败 → 可能导致 PR 无法合并 → 需确认是否因 yamllint 警告触发还是其他语法错误 完成度分析
正面发现
建议验证
最终结论修复后合入 - 代码质量和设计优秀,测试充分,但需先解决 CI 失败问题(Lint + Coverage)。建议:
|
|
OpenCI issue agent executed:
Reasoning: |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.



Problem
Issue #177 ("Flag audit — 2026-06-01") was filed by automation with a body that
was literally a file path:
Root cause
claude-code-action@v1.xno longer returns Claude's text — it only exposesexecution_file, a path to a JSONL transcript.claude-harnessre-exportsthat path under the deprecated
resultalias. Five pre-v1 callers still readresultas if it were text and used it directly:result_common/flag-auditprd/create-releasestg/agent-testpr/agent-test-genci/eval-smokeresultoutputFix
New shared action
_common/extract-text+extract-text.shthat reads theexecution file and recovers the agent's final text, with layered strategies:
.resultstring (claude-code-action success).resultMissing / skipped / unparseable → empty string, exit 0 (callers degrade).
Wired the helper into all five callers; each now feeds
execution-filethroughextract-textinstead of using the raw path.Kept the
resultalias onclaude-harnessfor any unmigrated consumers andpointed its docs at the new helper.
Added
tests/actions/extract-text.bats(10 cases, all passing).Verification
extract-text.bats— 10/10 passworkflow-integrity.bats+harness-shape.bats+workflow-audit.bats— 46/46 pass(incl. "composite preserves deprecated
resultoutput alias")bash -nclean on the new scriptCloses #177
https://claude.ai/code/session_01AaRMRGhaE2wWdis47Y4UNt
Generated by Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
Documentation
Tests